package com.alisls.demo.springcloud.service.user.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * 描述信息
 *
 * @author Ke Wang
 * @date 2020/10/31
 */
@Component
public class TokenFeignClientInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate requestTemplate) {
        //byte[] bytes = requestTemplate.requestBody().asBytes();
        String authorization = "Basic d3d3LmFsaXNscy5jb20tcGM6MTIzNDU2";
        requestTemplate.header("authorization", authorization);
    }

}
